import service from "../../utils/request"
const api = {
    getlist:'tienchin/activity/list',//促销活动列表
    qudaomingcheng:'tienchin/activity/channel/list',//渠道名称
    huodongzhuangtai:'system/dict/data/type/activity_status',//活动状态
    huodongleixing:'system/dict/data/type/activity_type',//活动类型
    addhuodong:'tienchin/activity',//新增活动
    deletehuodong:'tienchin/activity/',//删除活动
    edithuodong:'tienchin/activity',//编辑活动
}
//编辑活动
export function edithuodong(data) {
    return service({
        url: api.edithuodong,
        method: 'put',
        data: data
    })
}
//删除活动
export function deletehuodong(data) {
    return service({
        url: api.deletehuodong+data,
        method: 'DELETE',
        // data: data
    })
}
//新增活动
export function addhuodong(data) {
    return service({
        url: api.addhuodong,
        method: 'post',
        data: data
    })
}
//活动类型
export function huodongleixing(data) {
    return service({
        url: api.huodongleixing,
        method: 'get',
        params: data
    })
}
//活动状态
export function huodongzhuangtai(data) {
    return service({
        url: api.huodongzhuangtai,
        method: 'get',
        params: data
    })
}
//渠道名称
export function qudaomingcheng(data) {
    return service({
        url: api.qudaomingcheng,
        method: 'get',
        params: data
    })
}
//促销活动列表
export function getlist(data) {
    return service({
        url: api.getlist,
        method: 'get',
        params: data
    })
}